import App from './App'

import uView from "uview-ui";

import store from './store'     //引入vuex

import {requestText,requestImg} from 'util/Route.js'

Vue.use(uView);

uni.$u.http.setConfig((config) => {
    /* config 为默认全局配置*/
    config.baseURL = requestText; /* 根域名 */
	config.header= {
		token:uni.getStorageSync('token')
	}
    return config
})

// #ifndef VUE3
	import Vue from 'vue'
	Vue.config.productionTip = false
	
	Vue.prototype.$store = store    //挂载vuex
	
	App.mpType = 'app'
	const app = new Vue({
		...App
	})
	app.$mount()
// #endif


// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif